function main() {
  let redis_list = [];
  let redis_server_list = [
    {
      host: '172.16.0.102',
      portArr: [7000, 7001],
    },
    {
      host: '172.16.0.103',
      portArr: [7000, 7001],
    },
    {
      host: '172.16.0.105',
      portArr: [7000, 7001],
    },
  ];
  redis_server_list.map((server) => {
    let { host, portArr = [] } = server;
    portArr.map((port) => {
      redis_list.push({
        host,
        port,
        db: 1,
      });
    });
  });
  console.log(JSON.stringify(redis_list));
}

main();
